/*
 * @Author: moonwater 13812995013@163.com
 * @Date: 2025-03-05 09:43:08
 * @LastEditors: moonwater 13812995013@163.com
 * @LastEditTime: 2025-03-05 10:37:28
 * @FilePath: \盐师22Git仓库\day08\Animal.java
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
package day10;
public class Animal {
    //属性 一个是私有的 一个是公开的
    private String color;

    // public int age;
    public int age =10;

    
    //提供public的get，set方法
    // public Animal(){

    // }
    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }
   
    public int getAge() {
        return age;
    }
    public void setAge(int age) {
        this.age = age;
    }
    public void eat(){
        System.out.println("动物吃饭，吃的东西无法确定");
    }
    public void sleep(){
        System.out.println("动物睡觉，睡姿无法确定");
    }

}
